package org.example.springboot.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
@lombok.Data
@AllArgsConstructor
@NoArgsConstructor
public class Products {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("product_image")
    private String productImage;

    @TableField("product_name")
    private String productName;

    @TableField("model_number")
    private String modelNumber;

    @TableField("serial_number")
    private String serialNumber;

    @TableField("service_code")
    private String serviceCode;

    @TableField("supplier_name")
    private String supplierName;

    @TableField("category")
    private String category;

    @TableField("purchase_price")
    private String purchasePrice;

    @TableField("sale_price")
    private String salePrice;

    @TableField("warranty_period")
    private String warrantyPeriod;

    @TableField("status")
    private String status;

    @TableField("stock")
    private String stock; // 库存数量

    @TableField("stock_status")
    private String stockStatus;

    @TableField("in_order_id")
    private String inOrderId; // 入库订单ID

    @TableField("in_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime inTime; // 入库时间

    @TableField("out_order_id")
    private String outOrderId; // 出库订单ID

    @TableField("out_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime outTime; // 出库时间

    @TableField("customer_name")
    private String customerName; // 客户名称

    @TableField("project_name")
    private String projectName; // 项目名称

    @TableField("sales_team")
    private String salesTeam; // 销售团队

    @TableField("after_sales_team")
    private String afterSalesTeam; // 售后团队

    @TableField("notes")
    private String notes; // 备注信息

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime updateTime; // 更新时间
}
